package com.zyf.chapter02.structure.adapter.example2.refactor;

import com.zyf.chapter02.structure.adapter.example2.BSensitiveWordsFilter;

/**
 * B 敏感词过滤系统适配器
 * @author yifeng
 */
public class BSensitiveWordsFilterAdaptor implements ISensitiveWordsFilter{
    private BSensitiveWordsFilter bFilter;

    public BSensitiveWordsFilterAdaptor(BSensitiveWordsFilter bFilter) {
        this.bFilter = bFilter;
    }

    @Override
    public String filter(String text) {
        String maskedText = bFilter.filter(text);
        return maskedText;
    }
}
